import request from '@/utils/request'

// 查询指标类型列表
export function listDimZblx(query) {
  return request({
    url: '/reportworld/dimZblx/list',
    method: 'get',
    params: query
  })
}

// 查询指标类型详细
export function getDimZblx(data) {
  return request({
    url: '/reportworld/dimZblx/getZblx',
    method: 'post',
    data: data
  })
}

// 查询指标类型详细
export function getDimZblxByCode(data) {
  return request({
    url: '/reportworld/dimZblx/getDimZblxByCode/',
    method: 'post',
    data: data
  })
}

// 新增指标类型
export function addZblx(data) {
  return request({
    url: '/reportworld/dimZblx',
    method: 'post',
    data: data
  })
}

// 修改指标类型
export function updateDimZblx(data) {
  return request({
    url: '/reportworld/dimZblx',
    method: 'put',
    data: data
  })
}

// 删除指标类型
export function delDimZblx(idList, hisVersion) {
  const data = {
    idList,
    hisVersion
  };
  return request({
    url: '/reportworld/dimZblx/remove',
    method: 'post',
    data: data
  })
}

// 初始化查询
export function init(data) {
  return request({
    url: '/reportworld/dimZblx/init',
    method: 'post',
    data: data
  })
}
